<template>
    <el-tabs id="auth" v-model="active" type="card">
        <el-tab-pane label="登录" name="login" >
            <Login v-on:iclose="toClose"></Login>
        </el-tab-pane>
        <el-tab-pane label="注册" name="register" >
            <Register v-on:iclose="toClose" ></Register>
        </el-tab-pane>
    </el-tabs>
</template>

<script>
    import Login from "../components/Login.vue";
    import Register from "../components/Register.vue";
    export default {
        name: "Auth",
        components: {Register, Login},
        data(){
            return {
                active: 'login'
            }
        },
        methods: {
            toClose(success = false){
                this.$emit('close')
            }
        }
    }
</script>

<style scoped>
    #auth{
        align-content: center;
    }

</style>